<%@ page import="com.checkfree.isolutions.customer.persist.*" %>
<%@ page import="com.checkfree.isolutions.statement.*" %>
<%@ page import="com.checkfree.isolutions.statement.persist.*" %>
<%@ page import="com.myebills.ebpsfrontend.cust.utils.*" %>
<%@ page import="com.myebills.ebpsfrontend.cust.controller.*" %>
<%@ page import="com.checkfree.isolutions.property.Properties" %>
<%@ page import="com.checkfree.isolutions.property.PropertiesConfig" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.text.*" %>

<!doctype html>

<!-- HTML5 Boilerplate -->
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->

<head>
<meta charset="utf-8">

<title>Maxis Bill Delivery (Step 2)</title>

<meta name="description" content="" />
<meta name="author" content="" />
<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="cleartype" content="on" />
<link rel="stylesheet" href="css/master.css">

<script src="js/modernizr-2.5.3-respond-1.1.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.8.2.min.js"><\/script>')</script>

<link rel="shortcut icon" href="/favicon.ico">

</head>

<body class="clearfix" onload="iframeResizePipe()" style="background:transparent;">

<iframe id="helpframe" src='' height='0' width='0' frameborder='0'></iframe>

<script type="text/javascript">
  function iframeResizePipe()
  {
     // What's the page height?
     //var height = document.body.scrollHeight;
	 var height = document.documentElement.scrollHeight;

     // Going to 'pipe' the data to the parent through the helpframe..
     var pipe = document.getElementById('helpframe');

     // Cachebuster a precaution here to stop browser caching interfering
	 pipe.src = 'https://www.maxis.com.my/content/dam/maxis/html/helper.html?height='+height+'&cacheb='+Math.random();
     //pipe.src = 'http://maxis-stage-web.xm-apac.com/content/dam/html/helper.html?height='+height+'&cacheb='+Math.random();

  }
</script>
<%
    final EbppxBillDeliveryDataBean billDeliveryBean = (EbppxBillDeliveryDataBean) request.getAttribute(EbppxConstants.CONFIRM_BILL_SUBSCRIPTIONS);
	if(billDeliveryBean!=null){
		//boolean boolSupress = false;
		boolean boolSms = false;
		boolean boolEmail = false;

		//String billSupressSubscription = billDeliveryBean.getPhysicalBillSubscription();
		/* if(billSupressSubscription.equals("1")){
			boolSupress=true;
		} */
		String emailDeliverySubcription = billDeliveryBean.getEBillSubscription();
		if(emailDeliverySubcription.equals("1") || emailDeliverySubcription.equals("P")){
			boolEmail=true;
		}
		String smsNotificationSubscription = billDeliveryBean.getSMSSubscription();
		if(smsNotificationSubscription.equals("1")){
			boolSms=true;
		}
		String strAccNo = billDeliveryBean.getAcctNo();
		String emailAdd = billDeliveryBean.getAcctDetailsEmailAdd();
		String smsNo = billDeliveryBean.getSMSNo();
	
	
%>    
<div class="delivery_confirm">
	<hr class="hr_dashed" />
	<form class="delivery_confirmation" name="delivery_confirmation" action="CusSaveBillDelivery_v1r00" method="post">
	<input type="hidden" name="accNo" value="<%=strAccNo%>">
	<input type="hidden" name="emailDeliverySubscription" value="<%=emailDeliverySubcription%>">
	<input type="hidden" name="smsNotificationSubscription" value="<%=smsNotificationSubscription%>">
	<input type="hidden" name="emailAdd" value="<%=emailAdd%>">
	<input type="hidden" name="smsNo" value="<%=smsNo%>">
		<p>You have made the following changes:</p>
		<table class="mobile_vas" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<th>Account</th>
				<th>Changes</th>
				<th>Status</th>
			</tr>
			<tr>
				<td><%=strAccNo%></td>
				<td>
					SMS Number for Notification<br style="display:table"/>
					SMS Number : <%=smsNo%><br style="display:table"/>
				</td>
				<td>
					Status: <%=boolSms?"Subscribed":"Unsubscribed"%>
				</td>
				
			</tr>
			<tr>
				<td></td>
				<td>
					Email Address for Bill Delivery<br style="display:table"/>
					Email Address : <%=emailAdd%><br style="display:table"/><br style="display:table"/>
				</td>
				<td>
					Status: <%=boolEmail?"Subscribed":"Unsubscribed"%>
				</td>
			</tr>
			<%-- <tr>
				<td></td>
				<td>
					Don't send bill via post<br style="display:table"/><br style="display:table"/>
				</td>
				<td>
					Status: <%=boolSupress?"Subscribed":"Unsubscribed"%>
				</td>
			</tr> --%>
		</table>
		<div class="clearfix"></div>
		<div class="align-center">
			<input class="btn" type="button" value="Cancel" onclick="javascript:history.back()"/>
			<input class="btn" type="button" value="Confirm" onclick="document.delivery_confirmation.submit()" />
		</div>
	</form>
</div>
<%
}else{%>
	
	<div class="delivery_confirm">
	<hr class="hr_dashed" />
	<p>You have not made any changes.</p>
			<div class="align-center">
			<input type="button" class="btn" value="Back" onclick="javascript:history.back()"/>
		</div>
	</div>
<%}%>


<script src="js/jquery-ui-1.9.2.custom.min.js"></script> 
<script src="js/plugins.js"></script>
<script src="js/helper.js"></script>
<script src="js/jquery.fancybox.js" type="text/javascript"></script>



</body>
</html>